﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:in="http://schemas.microsoft.com/expression/2010/interactions"
    xmlns:controls="clr-namespace:SEToolbox.Controls"
    xmlns:converters="clr-namespace:SEToolbox.Converters"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

    <!--<LinearGradientBrush x:Key="ResizeGripBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFE7E8EB" Offset="0" />
        <GradientStop Color="#FFB7BCC8" Offset="0.35" />
        <GradientStop Color="#FFA9AFB6" Offset="0.40" />
        <GradientStop Color="#FFA5ABAF" Offset="0.40" />
        <GradientStop Color="#FFAEB4BA" Offset="1" />
    </LinearGradientBrush>-->

    <!--<Style TargetType="{x:Type controls:ResizeGripHolder}" BasedOn="{StaticResource {x:Type StatusBarItem}}">
        <Setter Property="BorderBrush" Value="{x:Static SystemColors.ActiveBorderBrush}" />
        <Setter Property="BorderThickness" Value="1,0,0,0" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="MinWidth" Value="18" />
        <Setter Property="Background" Value="{DynamicResource ResizeGripBackgroundBrush}"/>
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=ResizeMode}" Value="CanResizeWithGrip" />
                    <Condition Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=WindowState}" Value="Normal" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Width" Value="34" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>-->

    <GradientStopCollection x:Key="BusyIndicatorBrush" >
        <GradientStop Offset="0.00" Color="#FF4050FF"/>
        <GradientStop Offset="0.50" Color="#A090A0FF"/>
        <GradientStop Offset="1.00" Color="#00C0D0FF"/>
    </GradientStopCollection>

    <Style TargetType="{x:Type controls:BusyIndicator}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="Background" Value="#30000000"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:BusyIndicator}">
                    <ControlTemplate.Triggers>
                        <EventTrigger SourceName="canvas" RoutedEvent="Canvas.Loaded">
                            <BeginStoryboard>
                                <Storyboard x:Name="spinner" RepeatBehavior="Forever">
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                        <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="0"/>
                                        <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="180"/>
                                        <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="360"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                    <Border Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <Grid>
                            <Canvas Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <Canvas x:Name="canvas" Height="24" Width="24" RenderTransformOrigin="0.5,0.5">
                                    <Canvas.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Canvas.RenderTransform>
                                    <Path Data="F1 M 10.000,2.918 C 6.123,2.918 2.964,6.050 2.920,9.917 L 0.002,9.917 C 0.046,4.441 4.514,0.000 10.000,0.000 C 15.487,0.000 19.954,4.441 19.999,9.917 L 17.080,9.917 C 17.036,6.050 13.878,2.918 10.000,2.918 Z" Canvas.Top="1.932" Canvas.Left="1.937">
                                        <Path.Fill>
                                            <LinearGradientBrush MappingMode="Absolute" StartPoint="399.906,240.414" EndPoint="419.903,240.414" GradientStops="{StaticResource BusyIndicatorBrush}">
                                                <LinearGradientBrush.Transform>
                                                    <MatrixTransform Matrix="-1.000,0.000,0.000,-1.000,419.905,245.373" />
                                                </LinearGradientBrush.Transform>
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                    <Path Data="F1 M 17.080,9.917 C 17.083,13.904 13.905,17.082 10.000,17.082 C 6.095,17.082 2.917,13.904 2.917,10.000 C 0.002,9.945 0.000,9.972 0.000,10.000 C 0.000,15.514 4.485,20.000 10.000,20.000 C 15.514,20.000 20.000,15.514 20.000,10.000 L 20.000,9.972 19.999,9.945 19.999,9.917 Z" Canvas.Top="1.932" Canvas.Left="1.937">
                                        <Path.Fill>
                                            <LinearGradientBrush MappingMode="Absolute" StartPoint="489.491,230.414" EndPoint="509.491,230.414" GradientStops="{StaticResource BusyIndicatorBrush}">
                                                <LinearGradientBrush.Transform>
                                                    <MatrixTransform Matrix="1.000,0.000,-0.000,-1.000,-489.491,245.373" />
                                                </LinearGradientBrush.Transform>
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Canvas>
                            </Canvas>

                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
